package com.ssy.lingxi.purchase.repository.bidding;

import com.ssy.lingxi.purchase.entity.bidding.BiddingProduct;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
*采购竞价
*/
@Repository
public interface BiddingProductRepository extends JpaRepository<BiddingProduct, Long> {


    List<BiddingProduct> findAllByBiddingId(Long bidding);

    Page<BiddingProduct> findAllByBiddingId(Long bidding, Pageable page);

    void deleteAllByBiddingId(Long bidding);

    void deleteAllByBiddingIdIn(List<Long> biddingId);

    List<BiddingProduct> findAllByBiddingIdIn(Set<Long> biddingIds);
}
